import config from "@/config"
import http from "@/utils/request"
import { objectToFormData } from "@/utils/formDataFormat";

export default {
    APIBatchList: {
        url: `${config.API_URL}/api_1_0/Batch`,
        name: "批次查询接口",
        http: async function(data = {}) {
            return await http.get(this.url, data);
        }
    },
    APIBatchAdd: {
        url: `${config.API_URL}/api_1_0/Batch`,
        name: "批次添加接口",
        http: async function(data = {}) {
            return await http.post(this.url, objectToFormData(data));
        }
    },
    APIBatchPut: {
        url: `${config.API_URL}/api_1_0/Batch`,
        name: "批次修改接口",
        http: async function(data = {}) {
            return await http.put(this.url, objectToFormData(data));
        }
    },
    APIBatchDelete: {
        url: `${config.API_URL}/api_1_0/Batch`,
        name: "批次删除接口",
        http: async function(data = {}) {
            return await http.delete(this.url, objectToFormData(data));
        }
    },
}